.TH std::bad_expected_access 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::bad_expected_access \- std::bad_expected_access

.SH Synopsis
   Defined in header <expected>
   template< class E >                                               \fB(1)\fP (since C++23)
   class bad_expected_access : public std::bad_expected_access<void>
   template<>                                                        \fB(2)\fP (since C++23)
   class bad_expected_access<void> : public std::exception

   1) Defines a type of object to be thrown by std::expected::value when accessing an
   expected object that contains an unexpected value. bad_expected_access<E> stores a
   copy of the unexpected value.
   2) bad_expected_access<void> is the base class of all other bad_expected_access
   specializations.

    This section is incomplete
    Reason: inheritance diagram

.SH Parameters

   \fI(none)\fP

.SH Return value

   Pointer to a null-terminated string with explanatory information. The string is
   suitable for conversion and display as a std::wstring. The pointer is guaranteed to
   be valid at least until the exception object from which it is obtained is destroyed,
   or until a non-const member function (e.g. copy assignment operator) on the
   exception object is called.

.SH Notes

   Implementations are allowed but not required to override what().

   Members of the bad_expected_access<void> specialization

   constructor   constructs a bad_expected_access<void> object
                 \fI(protected member function)\fP
   destructor    destroys the bad_expected_access<void> object
                 \fI(protected member function)\fP
   operator=     replaces the bad_expected_access<void> object
                 \fI(protected member function)\fP
   what          returns the explanatory string
                 \fI(public member function)\fP

   Special member functions of bad_expected_access<void> are protected. They can only
   be called by derived classes.

.SH Example

    This section is incomplete
    Reason: no example

.SH Categories:
     * Todo with reason
     * Todo no example
